import request from '@/utils/request'
/*
	最后构建的cube信息
*/
const lastCube = (cubeId) => request.get('/kylin/optimize/lastCube', { params: { cubeId }}).then(resp => resp.data)
/*
  Cube详情
 */
const cube = (id) => request.get(`/kylin/cube/${id}`).then(resp => resp.data)
/*
	调优建议
*/
const suggest = (cubeId) => request.get(`/kylin/optimize/suggest`, { params: { cubeId }}).then(resp => resp.data)

/*
	重合率
*/
const shrink = (cubeId) => request.get(`/kylin/optimize/shrink`, { params: { cubeId }}).then(resp => resp.data)

/*
	维度查询分析
*/
const rowkeyStats = (cubeId) => request.get(`/kylin/optimize/rowkeyStats`, { params: { cubeId }}).then(resp => resp.data)

/*
	得分
*/
const score = (cubeId) => request.get(`/kylin/optimize/score`, { params: { cubeId }}).then(resp => resp.data)

export default {
  lastCube,
  cube,
  suggest,
  shrink,
  rowkeyStats,
  score
}
